package com.authine.cloudpivot.app.openapi.feign;

import com.alibaba.cola.dto.Response;
import com.authine.cloudpivot.app.openapi.dto.domainmodel.GatewayRouteDefinition;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author carter
 * create_date  2020/5/29 11:30
 * description     对系统内其它微服务的feign接口
 */
@FeignClient(value = "app-openapi", path = "openapi")
public interface GatewayFeignServiceI {

    @ApiOperation("增加路由")
    @PostMapping("/route/add")
    Response add(@RequestBody GatewayRouteDefinition param);

    @ApiOperation("删除路由")
    @DeleteMapping("/route/delete/{id}")
    Response delete(@PathVariable("id") String id);

    @ApiOperation("更新路由")
    @PostMapping("/route/update")
    Response update(@RequestBody GatewayRouteDefinition param);

}
